package org.nowcoder.leetcode.string;

/**
 * Title  : 344. Reverse String
 * Source : https://leetcode.cn/problems/reverse-string/description/
 * Author : XrazYang
 * Date   : 2023-10-20
 */

public class LeetCode_344 {
    public void reverseString(char[] s) {
        int n = s.length;
        for (int i = 0; i < n / 2; i++) {
            char c = s[i];
            s[i] = s[n - 1 - i];
            s[n - 1 - i] = c;
        }
    }
}
